transpose
transpose(matrix: any[] | Mat): any[]
param matrix
- The Array
or Mat
to get the transpose of. Should be square and 2 dimensional.
returns: any[]
- An Array
that is the transpose of matrix
.
This function returns a new matrix that is the transpose of matrix
, which should be a 2-D, square matrix.
A transpose of a matrix is the resulting matrix when you swap the rows and columns.